Image processing method and apparatus, electronic device, and storage medium

ABSTRACT

Embodiments of the present disclosure provide an image processing method and apparatus, an electronic device, and a storage medium; the method includes: collecting a first frame image containing a target object; detecting key points of the target object in the first frame image to obtain first position information of the key points; generating and presenting a cartoon character in the same form as the target object based on the first position information of the key points; collecting a second frame image containing the target object, where the first frame image and the second frame image are consecutive frame images; detecting key points of the target object in the second frame image to obtain second position information of the key points; and updating a form of the presented cartoon character based on a difference between the first position information and the second position information.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of International Application No.PCT/CN2020/122832, filed on Oct. 22, 2020, which claims priority toChinese Patent Application No. 201911060495.6, filed with the ChinaNational Intellectual Property Administration on Nov. 1, 2019 andentitled “IMAGE PROCESSING METHOD AND APPARATUS, ELECTRONIC DEVICE, ANDSTORAGE MEDIUM”. The above applications are incorporated herein byreference in their entireties.

TECHNICAL FIELD

Embodiments of the present disclosure relate to an image processingtechnology, and in particular, to an image processing method andapparatus, an electronic device, and a storage medium.

BACKGROUND

With the development of communication technology and terminal devices,various terminal devices such as mobile phones, tablet computers, etc.have become an indispensable part of people's work and life, and withthe increasing popularity of terminal devices, interactive applicationsbased on terminals have become a main channel of communication andentertainment. In related technologies, the interactive mode ofinteractive applications is single, which cannot meet diverse needs ofusers.

SUMMARY

The summary of the disclosure is provided to introduce concepts in abrief form, and these concepts will be described in detail in thefollowing description of embodiments. The summary of the disclosure isneither intended to identify key features or essential features of theclaimed technical solution, nor to be used to limit the scope of theclaimed technical solution.

In a first aspect, an embodiment of the present disclosure provides animage processing method, including:

collecting a first frame image containing a target object;

detecting key points of the target object in the first frame image toobtain first position information of the key points;

generating and presenting a cartoon character in a same form as thetarget object based on the first position information of the key points;

collecting a second frame image containing the target object, where thefirst frame image and the second frame image are consecutive frameimages;

detecting the key points of the target object in the second frame imageto obtain second position information of the key points; and

updating a form of the presented cartoon character based on a differencebetween the first position information and the second positioninformation.

In the above solution, the generating the cartoon character in the sameform as the target object based on the first position information of thekey points includes:

loading a cartoon material, where the cartoon material includes at leastone of a head material, a body material, and an apparel material of thecartoon character;

determining position information of head key points and body key pointsof the cartoon character based on the first position information of thekey points; and

generating the cartoon character in the same form as the target objectbased on the position information of the head key points and the bodykey points of the cartoon character, and the cartoon material.

In the above solution, the generating the cartoon character in the sameform as the target object based on the position information of the headkey points and the body key points of the cartoon character, and thecartoon material includes:

when the cartoon material includes the head material and the bodymaterial of the cartoon character, combining the head material and thebody material according to the position information of the head keypoints and the body key points of the cartoon character to obtain thecartoon character.

In the above solution, the generating the cartoon character in the sameform as the target object based on the first position information of thekey points includes:

determining position information of head key points and body key pointsof the cartoon character based on the first position information of thekey points;

drawing a head of the cartoon character in a form of lines based on theposition information of the head key points of the cartoon character;

drawing a body of the cartoon character in the form of lines based onthe position information of the body key points of the cartooncharacter; and

combining the drawn head and body of the cartoon character to obtain thecartoon character in the same form as the target object.

In the above solution, the drawing the body of the cartoon character inthe form of lines includes:

when it is determined based on positions of the body key points of thecartoon character that the body key points are not in a straight line,connecting the body key points through an arc to obtain a body in a formof an arc-shaped line whose body bending degree matches a body bendingdegree of the target object.

In the above solution, the presenting the cartoon character in the sameform as the target object includes:

determining a relative positional relationship between the cartooncharacter and the target object when the cartoon character and thetarget object are presented in a graphical interface; and

presenting the target object and the cartoon character through a samewindow based on the relative position relationship.

In the above solution, the presenting the cartoon character in the sameform as the target object includes:

respectively determining windows corresponding to the cartoon characterand the target object when the cartoon character and the target objectare presented in a graphical interface, where the cartoon character andthe target object correspond to different windows; and

respectively presenting the cartoon character and the target objectthrough a main window and a sub-window.

In the above solution, the updating the form of the presented cartooncharacter based on the difference between the first position informationand the second position information includes:

determining a position change of the key points of the cartoon characterbased on the difference between the first position information and thesecond position information; and

adjusting the form of the presented cartoon character based on theposition change of the key points of the cartoon character, so that theupdated form of the cartoon character is as same as a form of the targetobject in the second frame image.

In a second aspect, an embodiment of the present disclosure provides animage processing apparatus, including:

a first collecting unit, configured to collect a first frame imagecontaining a target object;

a first detecting unit, configured to detect key points of the targetobject in the first frame image to obtain first position information ofthe key points;

a processing unit, configured to generate and present a cartooncharacter in a same form as the target object based on the firstposition information of the key points;

a second collecting unit, configured to collect a second frame imagecontaining the target object, where the first frame image and the secondframe image are consecutive frame images;

a second detecting unit, configured to detect the key points of thetarget object in the second frame image to obtain second positioninformation of the key points; and

an updating unit which updates a form of the presented cartoon characterbased on a difference between the first position information and thesecond position information.

In the above solution, the processing unit is further configured to:

load a cartoon material, where the cartoon material includes at leastone of a head material, a body material, and an apparel material of thecartoon character;

determine position information of head key points and body key points ofthe cartoon character based on the first position information of the keypoints; and

generate the cartoon character in the same form as the target objectbased on the position information of the head key points and the bodykey points of the cartoon character, and the cartoon material.

In the above solution, the processing unit is further configured tocombine the head material and the body material according to theposition information of the head key points and the body key points ofthe cartoon character to obtain the cartoon character, when the cartoonmaterial includes the head material and the body material of the cartooncharacter.

In the above solution, the processing unit is further configured to:

when the cartoon material includes the head material of the cartooncharacter,

draw body of the cartoon character in a form of lines based on theposition information of the body key points of the cartoon character;and

combine the head material and the drawn body of the cartoon character toobtain the cartoon character in the same form as the target object.

In the above solution, the processing unit is further configured to:

determine position information of head key points and body key points ofthe cartoon character based on the first position information of the keypoints;

draw a head of the cartoon character in a form of lines based on theposition information of the head key points of the cartoon character;

draw a body of the cartoon character in the form of lines based on theposition information of the body key points of the cartoon character;and

combine the drawn head and body of the cartoon character to obtain thecartoon character in the same form as the target object.

In the above solution, the processing unit is further configured toconnect the body key points through an arc to obtain a body in a form ofan arc-shaped line whose body bending degree matches a body bendingdegree of the target object, when it is determined based on positions ofthe body key points of the cartoon character that the body key pointsare not in a straight line.

In the above solution, the processing unit is further configured to:

determine a relative positional relationship between the cartooncharacter and the target object when the cartoon character and thetarget object are presented in a graphical interface; and

present the target object and the cartoon character through a samewindow based on the relative position relationship.

In the above solution, the processing unit is further configured to:

respectively determine windows corresponding to the cartoon characterand the target object when the cartoon character and the target objectare presented in a graphical interface, where the cartoon character andthe target object correspond to different windows; and

respectively present the cartoon character and the target object througha main window and a sub-window.

In the above solution, the updating unit is further configured to:

determine a position change of the key points of the cartoon characterbased on the difference between the first position information and thesecond position information; and

adjust the form of the presented cartoon character based on the positionchange of the key points of the cartoon character, so that the updatedform of the cartoon character is as same as a form of the target objectin the second frame image.

In a third aspect, an embodiment of the present disclosure provides anelectronic device, including:

a memory, configured to store executable instructions; and

a processor, configured to implement the image processing methodprovided in the embodiments of the present disclosure when executing theexecutable instruction.

In a fourth aspect, an embodiment of the present disclosure provides astorage medium with executable instructions stored thereon, theexecutable instructions are configured to implement the image processingmethod provided by the embodiments of the present disclosure whenexecuted.

In a fifth aspect, an embodiment of the present disclosure provides acomputer program product including a computer program, the computerprogram is configured to implement the image processing method providedby the embodiments of the present disclosure when executed.

The embodiments of the present disclosure have the following beneficialadvantages:

by applying the above embodiments of the present disclosure, firstposition information of key points is obtained by detecting the keypoints of a target object in a first frame image; a cartoon character inthe same form as the target object is generated and presented based onthe first position information of the key points; and second positioninformation of the key points is obtained by detecting the key points ofthe target object in the second frame image; and then a form of thepresent cartoon character is updated based on a difference between thefirst position information and the second position information, thuscausing the generated cartoon character to follow the target object toperform the same action as the target object in the collected imageduring a video shooting process, thereby providing a user with a newinteractive mode and improving the user's sense of experience.

BRIEF DESCRIPTION OF DRAWINGS

The above and other features, advantages, and aspects of the embodimentsof the present disclosure will become more apparent in conjunction withthe accompanying drawings and with reference to the followingdescription of embodiments. Throughout the drawings, the same or similarreference signs indicate the same or similar elements. It should beunderstood that the drawings are schematic, and the components andelements are not always drawn to scale.

FIG. 1 is a schematic diagram of an optional architecture of an imageprocessing system 100 provided by an embodiment of the presentdisclosure;

FIG. 2 is a structural schematic diagram of an electronic device 20provided by an embodiment of the present disclosure;

FIG. 3 is an optional flowchart of an image processing method providedby an embodiment of the present disclosure;

FIG. 4 is a schematic diagram of key points of a target object in afirst frame image provided by an embodiment of the present disclosure;

FIG. 5 is an optional schematic diagram of a cartoon character providedby an embodiment of the present disclosure;

FIG. 6 is an optional schematic diagram of a cartoon character providedby an embodiment of the present disclosure;

FIG. 7 is an optional schematic diagram of a cartoon character providedby an embodiment of the present disclosure;

FIG. 8 is an optional schematic diagram of a cartoon character providedby an embodiment of the present disclosure;

FIG. 9 is a schematic diagram of an optional graphical interfacepresenting a cartoon character provided by an embodiment of the presentdisclosure;

FIG. 10 is a schematic diagram of an optional graphical interfacepresenting a cartoon character provided by an embodiment of the presentdisclosure;

FIG. 11 is a schematic diagram of an optional graphical interfacepresenting a cartoon character provided by an embodiment of the presentdisclosure;

FIG. 12A and FIG. 12B are an optional flowchart of an image processingmethod provided by an embodiment of the present disclosure;

FIG. 13A and FIG. 13B are an optional flowchart of an image processingmethod provided by an embodiment of the present disclosure;

FIG. 14A and FIG. 14B are an optional flowchart of an image processingmethod provided by an embodiment of the present disclosure; and

FIG. 15 is a schematic diagram of an optional composition structure ofan image processing apparatus provided by an embodiment of the presentdisclosure.

DESCRIPTION OF EMBODIMENTS

Hereinafter, the embodiments of the present disclosure will be describedin more detail with reference to the drawings. Although some embodimentsof the present disclosure are shown in the drawings, it should beunderstood that the present disclosure may be implemented in variousforms, and should not be construed as being limited to the embodimentsset forth herein, on the contrary, these embodiments are provided for amore thorough and complete understanding of the present disclosure. Itshould be understood that the drawings and embodiments of the presentdisclosure are only used for exemplary purposes, and are not used tolimit the protection scope of the present disclosure.

It should be understood that various steps recorded in theimplementation manners of the method of the present disclosure may beexecuted in a different order, and/or executed in parallel.Additionally, the implementation manners of the method may includeadditional steps and/or may omit the illustrated steps. The scope of thepresent disclosure is not limited in this aspect.

The term “include” and its variants as used herein are open-labelincludes, that is, “include but not limited to”. The term “based on” is“based at least in part on”. The term “an embodiment” means “at leastone embodiment”; the term “another embodiment” means “at least anotherembodiment”; the term “some embodiments” means “at least someembodiments”. Related definitions of other terms will be given in thefollowing description.

It should be noted that the concepts of “first”, “second”, etc.mentioned in the present disclosure are only used to distinguishdifferent apparatuses, modules, or units, and are not used to limit theorder or interdependence of functions performed by these apparatuses,modules or units.

It should be noted that the modifications of “a” and “a plurality of”mentioned in the present disclosure are illustrative and notrestrictive, and those skilled in the art should understand that unlessthe context clearly indicates otherwise, it should be understood as “oneor a plurality of”.

Names of messages or information interacted among multiple apparatusesin the embodiments of the present disclosure are only used forillustrative purposes, and are not used to limit the scope of thesemessages or information.

Referring to FIG. 1, which is a schematic diagram of an optionalarchitecture of an image processing system 100 provided by an embodimentof the present disclosure, in order to accomplish supporting anexemplary application, a terminal 200 (including a terminal 200-1 and aterminal 200-2), a terminal 200 is connected to a server 400 through anetwork 300, and the network 300, which may be a wide area network or alocal area network, or a combination of the two, uses wireless links toaccomplish data transmission.

The terminal 200 is configured to collect a first frame image containinga target object, and send the first frame image to the server 400;

the server 400 is configured to detect key points of the target objectin the first frame image to obtain first position information of the keypoints, and send the first position information of the key points to theterminal 200;

the terminal 200 is further configured to generate and present a cartooncharacter in a same form as the target object based on the firstposition information of the key points; collect a second frame imagecontaining the target object, and send the second frame image to theserver 400, where the first frame image and the second frame image areconsecutive frame images;

the server 400 is further configured to detect the key points of thetarget object in the second frame image to obtain second positioninformation of the key points, and send the second position informationof the key points to the terminal 200; and

the terminal 200 is further configured to update a form of the presentedcartoon character based on a difference between the first positioninformation and the second position information.

In practical applications, the server 200 may be either a server that isindependently configured to support various services, or may beconfigured as a server cluster; the terminal may be various types ofuser terminals such as a smart phone, a tablet computer, a notebookcomputer, etc., and may also be a wearable computing device, a personaldigital assistant (PDA), a desktop computer, a cellular phone, a mediaplayer, a navigation device, a game console, a television set, or acombination of any two or more of these or other data processingdevices.

An electronic device implementing the image processing method of theembodiments of the present disclosure will be described below. In someembodiments, the electronic device may be implemented in various forms,such as: independently implemented by the terminal such as a smartphone, a tablet computer, and a desktop computer, or implementedcollaboratively by the terminal and the server.

Referring to FIG. 2 below, which is a structural schematic diagram of anelectronic device 20 provided by an embodiment of the presentdisclosure. An electronic device illustrated in FIG. 2 is only anexample, and should not impose any limitation on the function and rangeof use of the embodiments of the present disclosure.

As illustrated in FIG. 2, the electronic device 20 may include aprocessing apparatus 210 (e.g., a central processing unit, a graphicprocessor, etc.), which may execute various appropriate actions andprocessing according to a program stored in a read-only memory 220 (ROM)or a program loaded from a storage apparatus 280 to a random accessmemory 230 (RAM). Various programs and data necessary for operations ofthe electronic device 20 are also stored in the RAM 230. The processingapparatus 210, the ROM 220, and the RAM 230 are connected to each otherthrough a bus 240. An input/output (I/O) interface 250 is also connectedto the bus 240.

Generally, the following apparatuses may be connected to the I/Ointerface 250: including an input apparatus 260, for example, a touchscreen, a touch pad, a keyboard, a mouse, a camera, a microphone, anaccelerometer, a gyroscope, etc.; including an output apparatus 270, forexample, a liquid crystal display (LCD), a speaker, a vibrator, etc.;including a storage apparatus 280, for example, a magnetic tape, a harddisk, etc.; and a communication apparatus 290. The communicationapparatus 290 may allow the electronic device 20 to communicate withother devices in a wireless or wired manner to exchange data. AlthoughFIG. 2 illustrates the electronic device 20 with various apparatuses, itshould be understood that not all of the illustrated apparatuses arerequired to be implemented or possessed. More or fewer apparatuses maybe alternatively implemented or possessed.

In particular, processes described by the provided flowcharts accordingto the embodiments of the present disclosure may be implemented ascomputer software programs. For example, the embodiments of the presentdisclosure include a computer program product, which includes a computerprogram carried on a computer-readable medium, where the computerprogram embodies a program code for executing the method illustrated inthe flowchart. In such an embodiment, the computer program may bedownloaded and installed from the network through the communicationapparatus 290, or installed from the storage apparatus 280, or installedfrom the ROM 220. When the computer program is executed by theprocessing apparatus 210, the functions in the image processing methodof the embodiments of the present disclosure are executed.

It should be noted that, the computer-readable medium described above inthe embodiments of the present disclosure may be a computer-readablesignal medium or a computer-readable storage medium, or any combinationof the foregoing two. The computer-readable storage medium may include,but is not limited to, for example, an electrical, magnetic, optical,electromagnetic, infrared, or semiconductor system, apparatus, ordevice, or any combination thereof. More specific examples of thecomputer-readable storage medium may include, but are not limited to: anelectrical connection with one or more wires, a portable computer disk,a hard disk, an RAM, an ROM, an erasable programmable read only memory(EPROM), a flash memory, a fiber optic, a portable compact diskread-only memory (CD-ROM), an optical storage means, a magnetic storagemeans, or any suitable combination of the foregoing.

In the embodiments of the present disclosure, a computer-readablestorage medium may be any tangible medium that contains or stores aprogram, which may be used by or in conjunction with an instructionexecution system, apparatus, or means.

However, in the embodiments of the present disclosure, acomputer-readable signal medium may include a data signal with acomputer-readable program code embodied therein propagated in a basebandor as part of a carrier. Such a propagated signal may take variousforms, including, but not limited to, an electro-magnetic signal, anoptical signal, or any suitable combination thereof. A computer-readablesignal medium may also be any computer readable medium that is not acomputer-readable storage medium and that may send, propagate, ortransmit a program for use by or in conjunction with an instructionexecution system, apparatus, or means. The program code embodied on thecomputer-readable medium may be transmitted using any suitable medium,including an electrical wire, an optical fiber cable, radio frequency(RF), etc., or any suitable combination of the foregoing.

The above computer-readable medium may be embodied in the aboveelectronic device 20; and may also exist alone without being assembledinto the electronic device 20.

The above computer-readable medium carries one or more programs which,when executed by the electronic device 20, cause the electronic device20 to execute the image processing method provided by an embodiment ofthe present disclosure.

The computer program code for implementing operations in the embodimentsof the present disclosure may be written in one or more programminglanguages or the combination thereof, including object-orientedprogramming languages—such as Java, Smalltalk, C++, and conventionalprocedural programming languages—such as the “C” language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the scenarioinvolving the remote computer, the remote computer may be connected tothe user's computer through any type of network, including a local areanetwork (LAN) or a wide area network (WAN), or the connection may bemade to an external computer (for example, through the Internet using anInternet Service Provider).

The flowcharts and block diagrams provided by an embodiment of thepresent disclosure illustrate the architecture, functionality, andoperations of possible implementations of systems, methods, and computerprogram products according to various embodiments of the presentdisclosure. In this regard, each block in the flowchart or blockdiagrams may represent a module, a program segment, or a portion ofcode, which includes one or more executable instructions forimplementing the specified logical functions. It should also be notedthat, in some alternative implementations, the functions noted in theblocks may occur out of the order noted in the drawing. For example, twoblocks shown in succession may, in fact, be executed substantially inparallel, or the blocks may also sometimes be executed in the reverseorder, depending on the functions involved. It is also noted that eachblock in the block diagrams and/or flowcharts, and a combination of theblocks may be implemented by a dedicated hardware-based system forperforming specified functions or operations, or by a combination ofdedicated hardware and computer instructions.

The involved units described in the embodiments of the presentdisclosure may be implemented in a software manner, and may also beimplemented in a hardware manner. Where the name of the unit does notconstitute a limitation of the unit itself in some cases, for example, afirst collecting unit may also be described as “collecting a first frameimage containing a target object”.

The functions described in the embodiments of the present disclosure maybe executed, at least in part, by one or more hardware logic components.For example, unrestrictedly, exemplary types of hardware logiccomponents that may be used include: a field-programmable gate array(FPGA), an application specific integrated circuit (ASIC), anapplication specific standard product (ASSP), a system on chip (SOC), acomplex programmable logic device (CPLD) and so on.

In the context of the embodiments of the present disclosure, acomputer-readable storage medium may be a tangible medium that maycontain or store a program for use by or in connection with aninstruction execution system, apparatus, or device. A machine-readablemedium may be a machine-readable signal medium or a machine-readablestorage medium. The machine-readable storage media may include, but isnot limited to, for example, an electrical, magnetic, optical,electromagnetic, infrared, or semiconductor system, apparatus, ordevice, or any suitable combination of the foregoing. More specificexamples of machine-readable storage medium may include, but are notlimited to an electrical connection with one or more wires, a portablecomputer disk, a hard disk, a random access memory (RAM), a read-onlymemory (ROM), an erasable programmable read only memory (EPROM or aflash memory), a fiber optic, a portable compact disk read-only memory(CD-ROM), an optical storage device, a magnetic storage device, or anysuitable combination of the foregoing.

With continuing reference to FIG. 3 which is an optional flowchart of animage processing method provided by an embodiment of the presentdisclosure, the image processing method provided by the embodiment ofthe present disclosure includes:

Step 301: a terminal collects a first frame image containing a targetobject.

In practical applications, the terminal is provided with a client, suchas an instant messaging client, a micro blog client, a short videoclient, etc., a user may click a video shooting button on a userinterface of the client to trigger a video shooting instruction, so thatthe terminal invokes an image collection sensor, such as a camera, tocollect the first frame image containing the target object. It should bestated that the target object of video shooting is the user who is beingshot, and the number of users may be one or more.

Step 302: detecting key points of the target object in the first frameimage to obtain first position information of the key points.

In actual implementations, the key points of the target object may bevarious joint points of a person in the first frame image, such as ahead, shoulders, elbows, wrists, etc. Referring to FIG. 4, which is aschematic diagram of key points of the target object in the first frameimage provided by an embodiment of the present disclosure, the targetobject includes 14 key points in total, and a form of the target objectmay be determined through the key points.

In some embodiments, the terminal may detect the key points of thetarget object through a neural network model obtained by training (e.g.,a convolutional neural network model (CNN)). In actual implementations,the terminal inputs the first frame image into the convolutional neuralnetwork model to obtain the first position information. Here, the firstposition information includes position information of each key point ofthe target object, and through establishment of a coordinate system inthe first frame image, the position information of each key point isrepresented by coordinates.

Step 303: generating and presenting a cartoon character in the same formas the target object based on the first position information of the keypoints.

In actual implementations, since the form of the target object may bedetermined according to the first position information of the keypoints, a cartoon character in the same form as the target object may begenerated based on the first position information of the key points, andthe generated cartoon character may be presented.

In some embodiments, the terminal may generate the cartoon character inthe same form as the target object in the following manner: loading acartoon material, where the cartoon material includes at least one of ahead material, a body material, and an apparel material of the cartooncharacter; determining position information of head key points and bodykey points of the cartoon character based on the first positioninformation of the key points; and generating the cartoon character inthe same form as the target object based on the position information ofthe head key points and the body key points of the cartoon character,and the cartoon material.

It should be stated that the head material is a head of the cartooncharacter, the body material includes limbs and a trunk of the cartooncharacter, and the clothing material includes clothes and shoes of thecartoon character. In actual implementations, the key points of thecartoon character and the key points of the target object are in aone-to-one correspondence, and the position information of the keypoints of the target object is determined based on the coordinate systemcorresponding to the first frame image, when generating the cartooncharacter, it is necessary to establish a coordinate systemcorresponding to the cartoon character, and determine the positioninformation of the head key points and the body key points of thecartoon character based on the correspondence between the coordinatesystem of the first frame image and the coordinate system of the cartooncharacter.

In some embodiments, when the cartoon material includes the headmaterial and the body material of the cartoon character, the terminalcombines the head material and the body material according to theposition information of the head key points and the body key points ofthe cartoon character to obtain the cartoon character.

Here the cartoon material includes the head material and the bodymaterial of the cartoon character, that is, each part of the body of thecartoon character has its corresponding material, and an entire cartooncharacter is constructed by combining the materials. In actualimplementations, a position and a size of each material may bedetermined through the position information of the head key points andthe body key points of the cartoon character, and then the head materialand the body material may be combined according to the position of eachmaterial.

For example, FIG. 5 is an optional schematic diagram of a cartooncharacter provided by an embodiment of the present disclosure. Referringto FIG. 5, the head and the body of the cartoon character are generatedfrom the cartoon material, and the position of the cartoon materialcorresponds to positions of the key points of the cartoon characters.

When the loaded cartoon material cannot constitute an entire cartooncharacter, it is necessary to draw the part of the cartoon characterlacking the cartoon material through lines.

In some embodiments, when the cartoon material includes the headmaterial of the cartoon character, drawing body of the cartoon characterin a form of lines based on the position information of the body keypoints of the cartoon character; and combining the head material withthe drawn body of the cartoon character to obtain the cartoon characterin the same form as the target object.

Here, since the cartoon material only includes the head material of thecartoon character and lacks the body of the cartoon character, it isnecessary to draw the body of the cartoon character, that is, the trunkand limbs of the cartoon character, through lines.

In actual implementations, the body key points are divided into trunkkey points and limbs key points of the cartoon character, and the trunkkey points and the limbs key points of the cartoon character arerespectively connected by lines. Among them, the body key pointsinclude: a left shoulder key point, a right shoulder key point, a lefthip key point, and a right hip key point, connecting the body key pointsin sequence through lines to draw and obtain the trunk of the cartooncharacter; the limbs key points include: double upper limb key pointsand double lower limb key points, where each of the upper limb keypoints includes: a shoulder key point, an elbow key point, and a wristkey point; each of the lower limb key points includes: a hip key point,a knee key point, and an ankle key point, connecting the limbs keypoints through lines to draw the limbs of the cartoon character. Forexample, the left shoulder key point, the left elbow key point, and theleft wrist key point are sequentially connected by lines to draw theleft upper limb of the cartoon character.

For example, FIG. 6 is an optional schematic diagram of a cartooncharacter provided by an embodiment of the present disclosure. Referringto FIG. 6, the head of the cartoon character is a cartoon material, thebody of the cartoon character is composed of lines, and the position ofthe head material corresponds to the position of the head key points,and the body of the cartoon character is obtained by connecting the bodykey points with lines.

In some embodiments, when the cartoon material includes the head andapparel materials of the cartoon character, due to lack of limbs of thecartoon character, drawing the limbs of the cartoon character in theform of lines based on the position information of the limbs key pointsof the cartoon character, and combining the head and apparel materialswith the drawn limbs of the cartoon character to obtain the cartooncharacter in the same form as the target object.

For example, FIG. 7 is an optional schematic diagram of a cartooncharacter provided by an embodiment of the present disclosure. Referringto FIG. 7, the head, clothes, and shoes of the cartoon character areloaded materials, while the limbs are consisted of lines.

In some embodiments, the terminal may generate the cartoon character inthe same form as the target object in the following manner: determiningposition information of the head key points and the body key points ofthe cartoon character based on the first position information of the keypoints; drawing a head of the cartoon character in the form of linesbased on the position information of the head key points of the cartooncharacter; drawing a body of the cartoon character in the form of linesbased on the position information of the body key points of the cartooncharacter; and combining the drawn head and body of the cartooncharacter to obtain the cartoon character in the same form as the targetobject.

Here, when no cartoon material is loaded, the entire cartoon characteris drawn through lines. In actual implementations, determining theposition of the head cartoon character based on the position informationof the head key points of the cartoon character, and drawing the head ofthe cartoon character by virtue of a circular line at a positioncorresponding to the head of the cartoon character. The body key pointsare divided into trunk key points and limbs key points, and the trunkkey points and the limbs key points of the cartoon character arerespectively connected by lines to draw the trunk and limbs of thecartoon character.

For example, FIG. 8 is an optional schematic diagram of a cartooncharacter provided by an embodiment of the present disclosure. Referringto FIG. 8, the head and body of the cartoon character are consisted oflines.

In some embodiments, when determining that the body key points are notin a straight line based on the positions of the body key points of thecartoon character, the terminal connects the body key points through anarc to obtain a body in the form of an arc-shaped line whose bodybending degree matches a body bending degree of the target object.

In actual implementations, judging whether the body key points arelocated in a straight line based on a slope of a straight line betweeneach two key points, if so, connecting the body key points directlythrough a straight line; otherwise, connecting three key points throughan arc to obtain the body in the form of an arc line whose body bendingdegree matches that of the target object.

For example, referring to FIG. 8, the three key points of the upperright limb of the cartoon character are not in a straight line,connecting the three key points through an arc to obtain an upper rightlimb in the form of an arc line whose bending degree matches that of theright upper limb of the target object.

In some embodiments, the terminal may present the cartoon character inthe same form as the target object in the following manner: determininga relative positional relationship between the cartoon character and thetarget object when the cartoon character and the target object arepresented in a graphical interface; and presenting the target object andthe cartoon character through the same window based on the relativepositional relationship.

In actual implementations, the relative positional relationship betweenthe cartoon character and the target object may be up and down, left andright, etc., the target object and the cartoon character are presentedthrough the same window based on the relative positional relationship.When presenting the target object and the cartoon character, the cartooncharacter may occupy a smaller display area relative to the targetobject, or the target object may occupy a smaller display area relativeto the cartoon character, or the target object and the cartoon charactermay occupy the same size of display areas.

For example, FIG. 9 is a schematic diagram of an optional graphicalinterface presenting a cartoon character provided by an embodiment ofthe present disclosure. Referring to FIG. 9, the target object and thecartoon character are presented through the same window, where thecartoon character is displayed at the lower right of the target object,and occupies a smaller display area relative to the target object.

In some embodiments, the terminal may present the cartoon character inthe same form as the target object in the following manner: respectivelydetermining windows corresponding to the cartoon character and thetarget object when the cartoon character and the target object arepresented in a graphical interface, where the cartoon character and thetarget object correspond to different windows; respectively presentingthe cartoon character and the target object through a main window and asub-window.

Here, a size of the main window is larger than that of the sub-window,and the sub-window is located on the main window.

In some embodiments, the cartoon character is presented through a mainwindow and the target object is presented through a sub-window. FIG. 10is a schematic diagram of an optional graphical interface presenting acartoon character provided by an embodiment of the present disclosure.Referring to FIG. 10, the graphical interface includes a main window anda sub-window, the sub-window is located in a lower right corner area ofthe main window, the cartoon character is presented through the mainwindow, and the target object is presented through the sub-window.

In some embodiments, the target object is presented through a mainwindow and the cartoon character is presented through a sub-window. FIG.11 is a schematic diagram of an optional graphical interface presentinga cartoon character provided by an embodiment of the present disclosure.Referring to FIG. 11, the graphical interface includes a main window anda sub-window, the sub-window is located in a lower right corner area ofthe main window, the target object is presented through the main window,and the cartoon character is presented through the sub-window.

Step 304: collecting a second frame image containing the target object,where the first frame image and the second frame image are consecutiveframe images.

Here, the collection of images is real-time collection, and the secondframe image is a continuous frame image after the first frame image.

Step 305: detecting the key points of the target object in the secondframe image to obtain second position information of the key points.

Here, the terminal may detect the key points of the target object in thesame manner as in Step 302.

Step 306: updating a form of the presented cartoon character based on adifference between the first position information and the secondposition information.

Here the morphological change of the target object may be determinedbased on the difference between the first position information and thesecond position information. By updating the form of the presentedcartoon character based on the difference between the first positioninformation and the second position information, the cartoon characteris caused to perform the same action as the target object.

In some embodiments, the terminal may update the form of the presentedcartoon character in the following manner: determining a position changeof the key points of the cartoon character based on the differencebetween the first position information and the second positioninformation; and adjusting the form of the presented cartoon characterbased on the position change of the key points of the cartoon character,so that the form of the updated cartoon character is as same as a formof the target object in the second frame image.

In actual implementations, it is possible to represent the change of thesecond position information relative to the first position informationby a vector, and then determine the position change of the key points ofthe cartoon character according to a corresponding relationship betweenthe two coordinate systems, and then adjust the form of the presentedcartoon character based on the position change of the key points of thecartoon character.

In practical applications, when the cartoon character is composedentirely of cartoon materials, adjusting the position of each cartoonmaterial according to the position change of the key points of thecartoon character; when the cartoon character is composed of a headmaterial and a drawn body of the cartoon character, adjusting theposition of the head material according to the position change of thekey points of the cartoon character, and adjusting a bending radian anda position of the body according to the position change of the keypoints of the body; when the cartoon character is entirely composed ofthe drawn head and body of the cartoon character, adjusting a bendingradian and a position of the linear body and the position of the headaccording to the position change of the key points of the cartooncharacter.

It should be stated that the terminal collects frame images containingthe target object in real time, and performs the following operationsfor each frame image collected: detecting position information of thekey points of the target object in the image, and updating the form ofthe presented cartoon character based on the difference from theposition information of the key points of the target object in theprevious frame image.

According to the embodiments of the present disclosure, first positioninformation of key points is obtained by detecting the key points of atarget object in a first frame image; a cartoon character in the sameform as the target object is generated and presented based on the firstposition information of the key points;

second position information of the key points is obtained by detectingthe key points of the target object in a second frame image; and then aform of the presented cartoon character is updated based on a differencebetween the first position information and the second positioninformation, thus causing the generated cartoon character to follow thetarget object to perform the same action as the target object in thecollected image during a video shooting process, thereby providing auser with a new interactive mode and improving the user's sense ofexperience.

The image processing method provided by an embodiment of the presentdisclosure is described below by taking a loaded cartoon materialincluding a head material as an example. FIG. 12A and FIG. 12B are anoptional flowchart of an image processing method provided by anembodiment of the present disclosure. Referring to FIG. 12A and FIG.12B, the image processing method according to the embodiment of thepresent disclosure includes:

Step 401: a client collects a first frame image containing a targetobject.

Here, in practical applications, the client may be a social networkclient, such as a short video client, an instant messaging client, ormay also be an image processing client, such as a beauty camera client.The client collects the first frame image containing the target objectby calling a camera of the terminal.

Step 402: detecting key points of the target object in the first frameimage to obtain first position information of the key points.

Step 403: loading a head material of a cartoon character.

Step 404: determining position information of head key points and bodykey points of the cartoon character based on the first positioninformation of the key points.

Step 405: drawing a body of the cartoon character in a form of linesaccording to the position information of the body key points of thecartoon character.

As illustrated in FIG. 9, the cartoon character is obtained by combiningthe head material and the body material, and the form of the cartooncharacter is as same as that of the target object.

Step 406: combining the drawn head and body of the cartoon characterbased on the position information of the head key points and the bodykey points of the cartoon character to obtain a cartoon character in thesame form as the target object.

Step 407: determining a relative positional relationship between thecartoon character and the target object when the cartoon character andthe target object are presented in a graphical interface to be that thecartoon character is located at a lower right direction of the targetobject.

Step 408: presenting the target object and the cartoon character throughthe same window based on the relative position relationship.

As illustrated in FIG. 9, the target object and the cartoon characterare presented through the same window, the cartoon character is locatedat a lower right direction of the target object, and the display area ofthe cartoon character is smaller than that of the target object.

Step 409: collecting a second frame image containing the target object,where the first frame image and the second frame image are consecutiveframe images.

Step 410: detecting the key points of the target object in the secondframe image to obtain second position information of the key points.

Step 411: determining a position change of the head key points and thebody key points of the cartoon character based on a difference betweenthe first position information and the second position information.

Step 412: adjusting positions of the head and body of the presentedcartoon character based on the position change of the head key pointsand the body key points of the cartoon character.

Here, the target object in the second frame image and the adjustedcartoon character are presented through the same window, where theadjusted cartoon character is in the same form as the target object inthe second frame image.

The image processing method provided by an embodiment of the presentdisclosure is described below by taking a cartoon material including ahead material and a body material as an example. FIG. 13A and FIG. 13Bare an optional flowchart of an image processing method provided by anembodiment of the present disclosure. Referring to FIG. 13A and FIG.13B, the image processing method according to the embodiment of thepresent disclosure includes:

Step 501: a client collects a first frame image containing a targetobject.

Here, in practical applications, the client may be a social networkclient, such as a short video client, an instant messaging client, ormay also be an image processing client, such as a beauty camera client.The client collects the first frame image containing the target objectby calling a camera of the terminal.

Step 502: detecting key points of the target object in the first frameimage to obtain first position information of the key points.

Step 503: loading a head material and a body material of the cartooncharacter.

Step 504: determining position information of head key points and bodykey points of the cartoon character based on the first positioninformation of the key points.

Step 505: combining the head material and the body material of thecartoon character based on the position information of the head keypoints and the body key points of the cartoon character to obtain acartoon character in the same form as the target object.

Step 506: combining the drawn head and body of the cartoon character toobtain the cartoon character in the same form as the target object.

As illustrated in FIG. 10, the cartoon character consists of the headmaterial and the drawn body.

Step 507: presenting the cartoon character through a main window in agraphical interface, and presenting the target object through asub-windows in the graphical interface.

As illustrated in FIG. 10, a size of the main window is larger than thatof the sub-window, and the sub-window is located on the main window. Theform of the cartoon character presented through the main window is assame as the form of the target object presented through the sub-window.

Step 508: collecting a second frame image containing the target object,where the first frame image and the second frame image are consecutiveframe images.

Step 509: detecting the key points of the target object in the secondframe image to obtain second position information of the key points.

Step 510: determining a position change of the head key points and thebody key points of the cartoon character based on a difference betweenthe first position information and the second position information.

Step 511: adjusting positions of the head material and the body materialaccording to the position change of the head key points and the body keypoints of the cartoon character.

Step 512: presenting the adjusted cartoon character through the mainwindow in the graphical interface, and presenting the target object inthe second frame image through the sub-window in the graphicalinterface.

The image processing method provided by an embodiment of the presentdisclosure is described below by taking a cartoon character drawn in aform of lines as an example. FIG. 14A and FIG. 14B are an optionalflowchart of an image processing method provided by an embodiment of thepresent disclosure. Referring to FIG. 14A and FIG. 14B, the imageprocessing method according to the embodiment of the present disclosureincludes:

Step 601: a client collects a first frame image containing a targetobject.

Here, in practical applications, the client may be a social networkclient, such as a short video client, an instant messaging client, ormay also be an image processing client, such as a beauty camera client.The client collects the first frame image containing the target objectby calling a camera of the terminal.

Step 602: detecting key points of the target object in the first frameimage to obtain first position information of the key points.

Step 603: determining position information of head key points and bodykey points of the cartoon character based on the first positioninformation of the key points.

Step 604: drawing a head of the cartoon character in a form of linesbased on the position information of the head key points of the cartooncharacter.

As illustrated in FIG. 11, the head of the cartoon character is acircular line.

Step 605: when it is determined based on the position information of thebody key points of the cartoon character that the body key points arenot in a straight line, connecting the body key points through arcs toobtain a body of the cartoon character.

As illustrated in FIG. 11, the body of the cartoon character arecomposed of arcs, where bending degrees of the arc lines are as same asbending degrees of the body of the target object.

Step 606: combining the drawn head and body of the cartoon character toobtain a cartoon character in the same form as the target object.

Step 607: presenting the target object through a main window in agraphical interface, and presenting the cartoon character through asub-window in the graphical interface.

As illustrated in FIG. 11, a size of the main window is larger than thatof the sub-window, and the sub-window is located on the main window. Thecartoon character presented through the sub-window is in the same formas the target object presented through the main window.

Step 608: collecting a second frame image containing the target object,where the first frame image and the second frame image are consecutiveframe images.

Step 609: detecting the key points of the target object in the secondframe image to obtain second position information of the key points.

Step 610: determining a position change of the head key points and thebody key points of the cartoon character based on a difference betweenthe first position information and the second position information.

Step 611: adjusting a bending radian and a position of the linear bodyand a position of the head based on the position change of the head keypoints and body key points of the cartoon character.

Step 612: presenting the target object in the second frame image throughthe main window in the graphical interface, and presenting the adjustedcartoon character through the sub-window in the graphical interface.

The software implementation of an image processing apparatus provided byan embodiment of the present disclosure will be described as follows.With reference to FIG. 15, which is a schematic diagram of an optionalcomposition structure of an image processing apparatus provided by anembodiment of the present disclosure, with reference to FIG. 15, theimage processing apparatus 70 according to the embodiment of the presentdisclosure includes:

a first collecting unit 71, configured to collect a first frame imagecontaining a target object;

a first detecting unit 72, configured to detect key points of the targetobject in the first frame image to obtain first position information ofthe key points;

a processing unit 73, configured to generate and present a cartooncharacter in a same form as the target object based on the firstposition information of the key points;

a second collecting unit 74, configured to collect a second frame imagecontaining the target object, where the first frame image and the secondframe image are consecutive frame images;

a second detecting unit 75, configured to detect the key points of thetarget object in the second frame image to obtain second positioninformation of the key points; and

an updating unit 76 which updates a form of the presented cartooncharacter based on a difference between the first position informationand the second position information.

In some embodiments, the processing unit 73 is further configured to:

load a cartoon material, where the cartoon material includes at leastone of a head material, a body material, and an apparel material of thecartoon character;

determining position information of head key points and body key pointsof the cartoon character based on the first position information of thekey points; and

generating the cartoon character in the same form as the target objectbased on the position information of the head key points and the bodykey points of the cartoon character, and the cartoon material.

In some embodiments, the processing unit 73 is further configured to,when the cartoon material includes the head material and the bodymaterial of the cartoon character, combine the head material and thebody material according to the position information of the head keypoints and the body key points of the cartoon character to obtain thecartoon character.

In some embodiments, the processing unit 73 is further configured to,when the cartoon material includes the head material the cartooncharacter,

draw body of the cartoon character in a form of lines based on theposition information of the body key points of the cartoon character;and

combine the head material and the drawn body of the cartoon character toobtain the cartoon character in the same form as the target object.

In some embodiments, the processing unit 73 is further configured todetermine position information of head key points and body key points ofthe cartoon character based on the first position information of the keypoints;

drawing a head of the cartoon character in a form of lines based on theposition information of the head key points of the cartoon character;

drawing a body of the cartoon character in the form of lines based onthe position information of the body key points of the cartooncharacter; and

combining the drawn head and body of the cartoon character to obtain thecartoon character in the same form as the target object.

In some embodiments, the processing unit 73 is further configured to,when it is determined based on positions of the body key points of thecartoon character that the body key points are not in a straight line,

connect the body key points through an arc to obtain a body in a form ofan arc-shaped line whose body bending degree matches a body bendingdegree of the target object.

In some embodiments, the processing unit 73 is further configured to:

determine a relative positional relationship between the cartooncharacter and the target object when the cartoon character and thetarget object are presented in a graphical interface; and

present the target object and the cartoon character through a samewindow based on the relative position relationship.

In some embodiments, the processing unit 73 is further configured to:

respectively determine windows corresponding to the cartoon characterand the target object when the cartoon character and the target objectare presented in a graphical interface, where the cartoon character andthe target object correspond to different windows; and

respectively present the cartoon character and the target object througha main window and a sub-window.

In some embodiments, the updating unit 76 is further configured to:

determine a position change of the key points of the cartoon characterbased on the difference between the first position information and thesecond position information; and

adjust the form of the presented cartoon character based on the positionchange of the key points of the cartoon character, so that the updatedform of the cartoon character is as same as a form of the target objectin the second frame image.

An image processing method is provided according to one or moreembodiments of the present disclosure, including:

collecting a first frame image containing a target object;

detecting key points of the target object in the first frame image toobtain first position information of the key points;

generating and presenting a cartoon character in a same form as thetarget object based on the first position information of the key points;

collecting a second frame image containing the target object, where thefirst frame image and the second frame image are consecutive frameimages;

detecting the key points of the target object in the second frame imageto obtain second position information of the key points; and

updating a form of the presented cartoon character based on a differencebetween the first position information and the second positioninformation.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the generating the cartooncharacter in the same form as the target object based on the firstposition information of the key points includes:

loading a cartoon material, where the cartoon material includes at leastone of a head material, a body material, and an apparel material of thecartoon character;

determining position information of head key points and body key pointsof the cartoon character based on the first position information of thekey points; and

generating the cartoon character in the same form as the target objectbased on the position information of the head key points and the bodykey points of the cartoon character, and the cartoon material.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the generating the cartooncharacter in the same form as the target object based on the positioninformation of the head key points and the body key points of thecartoon character, and the cartoon material includes:

when the cartoon material includes the head material and the bodymaterial of the cartoon character, combining the head material and thebody material according to the position information of the head keypoints and the body key points of the cartoon character to obtain thecartoon character.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the generating the cartooncharacter in the same form as the target object based on the firstposition information of the key points includes:

determining position information of head key points and body key pointsof the cartoon character based on the first position information of thekey points;

drawing a head of the cartoon character in a form of lines based on theposition information of the head key points of the cartoon character;

drawing a body of the cartoon character in the form of lines based onthe position information of the body key points of the cartooncharacter; and

combining the drawn head and body of the cartoon character to obtain thecartoon character in the same form as the target object.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the drawing the body of thecartoon character in the form of lines includes:

when it is determined based on positions of the body key points of thecartoon character that the body key points are not in a straight line,connecting the body key points through an arc to obtain a body in a formof an arc-shaped line whose body bending degree matches a body bendingdegree of the target object.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the presenting the cartooncharacter in the same form as the target object includes:

determining a relative positional relationship between the cartooncharacter and the target object when the cartoon character and thetarget object are presented in a graphical interface; and

presenting the target object and the cartoon character through a samewindow based on the relative position relationship.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the presenting the cartooncharacter in the same form as the target object includes:

respectively determining windows corresponding to the cartoon characterand the target object when the cartoon character and the target objectare presented in a graphical interface, where the cartoon character andthe target object correspond to different windows; and

respectively presenting the cartoon character and the target objectthrough a main window and a sub-window.

The above image processing method is provided according to one or moreembodiments of the present disclosure, where the updating the form ofthe presented cartoon character based on the difference between thefirst position information and the second position information includes:

determining a position change of the key points of the cartoon characterbased on the difference between the first position information and thesecond position information; and

adjusting the form of the presented cartoon character based on theposition change of the key points of the cartoon character, so that theupdated form of the cartoon character is as same as a form of the targetobject in the second frame image.

An image processing apparatus is provided according to one or moreembodiments of the present disclosure, including:

a first collecting unit, configured to collect a first frame imagecontaining a target object;

a first detecting unit, configured to detect key points of the targetobject in the first frame image to obtain first position information ofthe key points;

a processing unit, configured to generate and present a cartooncharacter in a same form as the target object based on the firstposition information of the key points;

a second collecting unit, configured to collect a second frame imagecontaining the target object, where the first frame image and the secondframe image are consecutive frame images;

a second detecting unit, configured to detect the key points of thetarget object in the second frame image to obtain second positioninformation of the key points; and

an updating unit which updates a form of the presented cartoon characterbased on a difference between the first position information and thesecond position information.

An electronic device is provided according to one or more embodiments ofthe present disclosure, including:

a memory, configured to store executable instructions; and

a processor, configured to implement the image processing methodprovided in the embodiments of the present disclosure when executing theexecutable instructions.

A storage medium is provided according to one or more embodiments of thepresent disclosure, the storage medium stores executable instructionswhich, when executed, are configured to implement the image processingmethod provided by the embodiments of the present disclosure.

The above description is merely embodiments of the present disclosureand explanations of the technical principles employed. Those skilled inthe art should understand that the scope of disclosure involved in thepresent disclosure is not limited to the technical solutions formed bythe specific combination of the above technical features, and shouldalso cover, without departing from the above disclosed concept, othertechnical solutions formed by any combination of the above technicalfeatures or their equivalent features. For example, a technical solutionformed by replacing the above features with technical features that havesimilar functions to those disclosed in the present disclosure (but notlimited to).

Additionally, although each operation is depicted in a particular order,which should not be understood as requiring that the operations shouldbe performed in the particular order shown or in a sequential order.Multitask and parallel processing may be advantageous under certaincircumstances. Likewise, although the above discussion contains severalspecific implementation details, those should not be construed aslimitations on the scope of the present disclosure. Certain featuresdescribed in the context of separate embodiments may also be implementedin combination in a single embodiment. Conversely, various featuresdescribed in the context of a single embodiment may also be implementedin multiple embodiments separately or in any suitable sub-combination.

Although the subject matter has been described in language specific tostructural features and/or method logic actions, it should be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or actions described above.Rather, the specific features and actions described above are merelyexample forms for implementing the claims.

What is claimed is:
 1. An image processing method, wherein the methodcomprises: collecting a first frame image containing a target object;detecting key points of the target object in the first frame image toobtain first position information of the key points; generating andpresenting a cartoon character in a same form as the target object basedon the first position information of the key points; collecting a secondframe image containing the target object, wherein the first frame imageand the second frame image are consecutive frame images; detecting thekey points of the target object in the second frame image to obtainsecond position information of the key points; and updating a form ofthe presented cartoon character based on a difference between the firstposition information and the second position information.
 2. The methodaccording to claim 1, wherein the generating the cartoon character inthe same form as the target object based on the first positioninformation of the key points comprises: loading a cartoon material,wherein the cartoon material comprises at least one of a head material,a body material, and an apparel material of the cartoon character;determining position information of head key points and body key pointsof the cartoon character based on the first position information of thekey points; and generating the cartoon character in the same form as thetarget object based on the position information of the head key pointsand the body key points of the cartoon character, and the cartoonmaterial.
 3. The method according to claim 2, wherein the generating thecartoon character in the same form as the target object based on theposition information of the head key points and the body key points ofthe cartoon character, and the cartoon material comprises: when thecartoon material comprises the head material and the body material ofthe cartoon character, combining the head material and the body materialaccording to the position information of the head key points and thebody key points of the cartoon character to obtain the cartooncharacter.
 4. The method according to claim 2, wherein the generatingthe cartoon character in the same form as the target object based on theposition information of the head key points and the body key points ofthe cartoon character, and the cartoon material comprises: when thecartoon material comprises the head material of the cartoon character,drawing body of the cartoon character in a form of lines based on theposition information of the body key points of the cartoon character;and combining the head material and the drawn body of the cartooncharacter to obtain the cartoon character in the same form as the targetobject.
 5. The method according to claim 1, wherein the generating thecartoon character in the same form as the target object based on thefirst position information of the key points comprises: determiningposition information of head key points and body key points of thecartoon character based on the first position information of the keypoints; drawing a head of the cartoon character in a form of lines basedon the position information of the head key points of the cartooncharacter; drawing a body of the cartoon character in the form of linesbased on the position information of the body key points of the cartooncharacter; and combining the drawn head and body of the cartooncharacter to obtain the cartoon character in the same form as the targetobject.
 6. The method according to claim 5, wherein the drawing the bodyof the cartoon character in the form of lines comprises: when it isdetermined based on positions of the body key points of the cartooncharacter that the body key points are not in a straight line,connecting the body key points through an arc to obtain a body in a formof an arc-shaped line whose body bending degree matches a body bendingdegree of the target object.
 7. The method according to claim 1, whereinthe presenting the cartoon character in the same form as the targetobject comprises: determining a relative positional relationship betweenthe cartoon character and the target object when the cartoon characterand the target object are presented in a graphical interface; andpresenting the target object and the cartoon character through a samewindow based on the relative position relationship.
 8. The methodaccording to claim 1, wherein the presenting the cartoon character inthe same form as the target object comprises: respectively determiningwindows corresponding to the cartoon character and the target objectwhen the cartoon character and the target object are presented in agraphical interface, wherein the cartoon character and the target objectcorrespond to different windows; and respectively presenting the cartooncharacter and the target object through a main window and a sub-window.9. The method according to claim 1, wherein the updating the form of thepresented cartoon character based on the difference between the firstposition information and the second position information comprises:determining a position change of the key points of the cartoon characterbased on the difference between the first position information and thesecond position information; and adjusting the form of the presentedcartoon character based on the position change of the key points of thecartoon character, so that the updated form of the cartoon character isas same as a form of the target object in the second frame image.
 10. Animage processing apparatus, wherein the apparatus comprises: a processorand a memory, wherein the memory is configured to store a computerprogram, and the processor is configured to call and run the computerprogram stored in the memory to: collect a first frame image containinga target object; detect key points of the target object in the firstframe image to obtain first position information of the key points;generate and present a cartoon character in a same form as the targetobject based on the first position information of the key points;collect a second frame image containing the target object, wherein thefirst frame image and the second frame image are consecutive frameimages; detect the key points of the target object in the second frameimage to obtain second position information of the key points; andupdate a form of the presented cartoon character based on a differencebetween the first position information and the second positioninformation.
 11. The apparatus according to claim 10, wherein theprocessor is further configured to: load a cartoon material, wherein thecartoon material comprises at least one of a head material, a bodymaterial, and an apparel material of the cartoon character; determineposition information of head key points and body key points of thecartoon character based on the first position information of the keypoints; and generate the cartoon character in the same form as thetarget object based on the position information of the head key pointsand the body key points of the cartoon character, and the cartoonmaterial.
 12. The apparatus according to claim 11, wherein the processoris further configured to: when the cartoon material comprises the headmaterial and the body material of the cartoon character, combine thehead material and the body material according to the positioninformation of the head key points and the body key points of thecartoon character to obtain the cartoon character.
 13. The apparatusaccording to claim 11, wherein the processor is further configured to:when the cartoon material comprises the head material of the cartooncharacter, draw body of the cartoon character in a form of lines basedon the position information of the body key points of the cartooncharacter; and combine the head material and the drawn body of thecartoon character to obtain the cartoon character in the same form asthe target object.
 14. The apparatus according to claim 10, wherein theprocessor is further configured to: determine position information ofhead key points and body key points of the cartoon character based onthe first position information of the key points; draw a head of thecartoon character in a form of lines based on the position informationof the head key points of the cartoon character; draw a body of thecartoon character in the form of lines based on the position informationof the body key points of the cartoon character; and combine the drawnhead and body of the cartoon character to obtain the cartoon characterin the same form as the target object.
 15. The apparatus according toclaim 14, wherein the processor is further configured to: when it isdetermined based on positions of the body key points of the cartooncharacter that the body key points are not in a straight line, connectthe body key points through an arc to obtain a body in a form of anarc-shaped line whose body bending degree matches a body bending degreeof the target object.
 16. The apparatus according to claim 10, whereinthe processor is further configured to: determine a relative positionalrelationship between the cartoon character and the target object whenthe cartoon character and the target object are presented in a graphicalinterface; and present the target object and the cartoon characterthrough a same window based on the relative position relationship. 17.The apparatus according to claim 10, wherein the processor is furtherconfigured to: respectively determine windows corresponding to thecartoon character and the target object when the cartoon character andthe target object are presented in a graphical interface, wherein thecartoon character and the target object correspond to different windows;and respectively present the cartoon character and the target objectthrough a main window and a sub-window.
 18. The apparatus according toclaim 10, wherein the processor is further configured to: determine aposition change of the key points of the cartoon character based on thedifference between the first position information and the secondposition information; and adjust the form of the presented cartooncharacter based on the position change of the key points of the cartooncharacter, so that the updated form of the cartoon character is as sameas a form of the target object in the second frame image.
 19. Anon-transitory storage medium storing executable instructions, theexecutable instructions being used to implement the image processingmethod, the method comprising: collecting a first frame image containinga target object; detecting key points of the target object in the firstframe image to obtain first position information of the key points;generating and presenting a cartoon character in a same form as thetarget object based on the first position information of the key points;collecting a second frame image containing the target object, whereinthe first frame image and the second frame image are consecutive frameimages; detecting the key points of the target object in the secondframe image to obtain second position information of the key points; andupdating a form of the presented cartoon character based on a differencebetween the first position information and the second positioninformation.